<template>
  <List :list="list" @select="handleSelect" />
</template>

<script>
import List from "./List";
export default {
  components: {
    List,
  },
  data() {
    return {
      list: [
        { name: "a", isSelected: false },
        { name: "b", isSelected: false },
        {
          name: "c",
          isSelected: true,
          children: [
            { name: "c1", isSelected: false },
            {
              name: "c2",
              isSelected: true,
              children: [
                { name: "c-1", isSelected: false },
                { name: "c-2", isSelected: true },
              ],
            },
            { name: "c3", isSelected: false },
          ],
        },
      ],
    };
  },
  methods: {
    handleSelect(item) {
      console.log(item);
    },
  },
};
</script>

<style>
</style>